<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_30) on Wed Jun 27 10:04:49 EEST 2012 -->
<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
<TITLE>
Motion
</TITLE>

<META NAME="date" CONTENT="2012-06-27">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Motion";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Motion.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/sun/lwuit/animations/CommonTransitions.html" title="class in com.sun.lwuit.animations"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/sun/lwuit/animations/Timeline.html" title="class in com.sun.lwuit.animations"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/sun/lwuit/animations/Motion.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Motion.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.sun.lwuit.animations</FONT>
<BR>
Class Motion</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.sun.lwuit.animations.Motion</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>Motion</B><DT>extends java.lang.Object</DL>
</PRE>

<P>
Abstracts the notion of physical motion over time from a numeric location to
 another. This class can be subclassed to implement any motion equation for
 appropriate physics effects.
 <p>This class relies on the System.currentTimeMillis() method to provide
 transitions between coordinates. The motion can be subclassed to provide every
 type of motion feel from parabolic motion to spline and linear motion. The default
 implementation provides a simple algorithm giving the feel of acceleration and
 deceleration.
<P>

<P>
<HR>

<P>

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#Motion(int, float, float)">Motion</A></B>(int&nbsp;sourceValue,
       float&nbsp;initVelocity,
       float&nbsp;friction)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a velocity motion</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#Motion(int, int, int)">Motion</A></B>(int&nbsp;sourceValue,
       int&nbsp;destinationValue,
       int&nbsp;duration)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a point/destination motion</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/sun/lwuit/animations/Motion.html" title="class in com.sun.lwuit.animations">Motion</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#createFrictionMotion(int, int, float, float)">createFrictionMotion</A></B>(int&nbsp;sourceValue,
                     int&nbsp;maxValue,
                     float&nbsp;initVelocity,
                     float&nbsp;friction)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a friction motion starting from source with initial speed and the friction</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/sun/lwuit/animations/Motion.html" title="class in com.sun.lwuit.animations">Motion</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#createLinearMotion(int, int, int)">createLinearMotion</A></B>(int&nbsp;sourceValue,
                   int&nbsp;destinationValue,
                   int&nbsp;duration)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a linear motion starting from source value all the way to destination value</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/sun/lwuit/animations/Motion.html" title="class in com.sun.lwuit.animations">Motion</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#createSplineMotion(int, int, int)">createSplineMotion</A></B>(int&nbsp;sourceValue,
                   int&nbsp;destinationValue,
                   int&nbsp;duration)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a spline motion starting from source value all the way to destination value</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#getCurrentMotionTime()">getCurrentMotionTime</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current time within the motion relative to start time</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#getDestinationValue()">getDestinationValue</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The number to which we will reach when the motion is finished</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#getDuration()">getDuration</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the animation duration</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#getSourceValue()">getSourceValue</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The number from which we are starting (usually indicating animation start position)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#getStartTime()">getStartTime</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The value of System.currentTimemillis() when motion was started</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#getValue()">getValue</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value for the motion for the current clock time.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#isFinished()">isFinished</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the motion has run its course and has finished meaning the current
 time is greater than startTime + duration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#setCurrentMotionTime(long)">setCurrentMotionTime</A></B>(long&nbsp;currentMotionTime)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allows overriding the getCurrentMotionTime method value with a manual value
 to provide full developer control over animation speed/position.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#setSourceValue(int)">setSourceValue</A></B>(int&nbsp;sourceValue)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The number from which we are starting (usually indicating animation start position)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#setStartTime(long)">setStartTime</A></B>(long&nbsp;startTime)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the start time of the motion</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sun/lwuit/animations/Motion.html#start()">start</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the start time to the current time</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="Motion(int, int, int)"><!-- --></A><H3>
Motion</H3>
<PRE>
protected <B>Motion</B>(int&nbsp;sourceValue,
                 int&nbsp;destinationValue,
                 int&nbsp;duration)</PRE>
<DL>
<DD>Construct a point/destination motion
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>sourceValue</CODE> - starting value<DD><CODE>destinationValue</CODE> - destination value<DD><CODE>duration</CODE> - motion duration</DL>
</DL>
<HR>

<A NAME="Motion(int, float, float)"><!-- --></A><H3>
Motion</H3>
<PRE>
protected <B>Motion</B>(int&nbsp;sourceValue,
                 float&nbsp;initVelocity,
                 float&nbsp;friction)</PRE>
<DL>
<DD>Construct a velocity motion
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>sourceValue</CODE> - starting value<DD><CODE>initVelocity</CODE> - initial velocity<DD><CODE>friction</CODE> - degree of friction</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="createLinearMotion(int, int, int)"><!-- --></A><H3>
createLinearMotion</H3>
<PRE>
public static <A HREF="../../../../com/sun/lwuit/animations/Motion.html" title="class in com.sun.lwuit.animations">Motion</A> <B>createLinearMotion</B>(int&nbsp;sourceValue,
                                        int&nbsp;destinationValue,
                                        int&nbsp;duration)</PRE>
<DL>
<DD>Creates a linear motion starting from source value all the way to destination value
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sourceValue</CODE> - the number from which we are starting (usually indicating animation start position)<DD><CODE>destinationValue</CODE> - the number to which we are heading (usually indicating animation destination)<DD><CODE>duration</CODE> - the length in milliseconds of the motion (time it takes to get from sourceValue to
 destinationValue)
<DT><B>Returns:</B><DD>new motion object</DL>
</DD>
</DL>
<HR>

<A NAME="createSplineMotion(int, int, int)"><!-- --></A><H3>
createSplineMotion</H3>
<PRE>
public static <A HREF="../../../../com/sun/lwuit/animations/Motion.html" title="class in com.sun.lwuit.animations">Motion</A> <B>createSplineMotion</B>(int&nbsp;sourceValue,
                                        int&nbsp;destinationValue,
                                        int&nbsp;duration)</PRE>
<DL>
<DD>Creates a spline motion starting from source value all the way to destination value
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sourceValue</CODE> - the number from which we are starting (usually indicating animation start position)<DD><CODE>destinationValue</CODE> - the number to which we are heading (usually indicating animation destination)<DD><CODE>duration</CODE> - the length in milliseconds of the motion (time it takes to get from sourceValue to
 destinationValue)
<DT><B>Returns:</B><DD>new motion object</DL>
</DD>
</DL>
<HR>

<A NAME="createFrictionMotion(int, int, float, float)"><!-- --></A><H3>
createFrictionMotion</H3>
<PRE>
public static <A HREF="../../../../com/sun/lwuit/animations/Motion.html" title="class in com.sun.lwuit.animations">Motion</A> <B>createFrictionMotion</B>(int&nbsp;sourceValue,
                                          int&nbsp;maxValue,
                                          float&nbsp;initVelocity,
                                          float&nbsp;friction)</PRE>
<DL>
<DD>Creates a friction motion starting from source with initial speed and the friction
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sourceValue</CODE> - the number from which we are starting (usually indicating animation start position)<DD><CODE>maxValue</CODE> - the maximum value for the friction<DD><CODE>initVelocity</CODE> - the starting velocity<DD><CODE>friction</CODE> - the motion friction
<DT><B>Returns:</B><DD>new motion object</DL>
</DD>
</DL>
<HR>

<A NAME="start()"><!-- --></A><H3>
start</H3>
<PRE>
public void <B>start</B>()</PRE>
<DL>
<DD>Sets the start time to the current time
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getCurrentMotionTime()"><!-- --></A><H3>
getCurrentMotionTime</H3>
<PRE>
public long <B>getCurrentMotionTime</B>()</PRE>
<DL>
<DD>Returns the current time within the motion relative to start time
<P>
<DD><DL>

<DT><B>Returns:</B><DD>long value representing System.currentTimeMillis() - startTime</DL>
</DD>
</DL>
<HR>

<A NAME="setCurrentMotionTime(long)"><!-- --></A><H3>
setCurrentMotionTime</H3>
<PRE>
public void <B>setCurrentMotionTime</B>(long&nbsp;currentMotionTime)</PRE>
<DL>
<DD>Allows overriding the getCurrentMotionTime method value with a manual value
 to provide full developer control over animation speed/position.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>currentMotionTime</CODE> - the time in milliseconds for the motion.</DL>
</DD>
</DL>
<HR>

<A NAME="setStartTime(long)"><!-- --></A><H3>
setStartTime</H3>
<PRE>
public void <B>setStartTime</B>(long&nbsp;startTime)</PRE>
<DL>
<DD>Sets the start time of the motion
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>startTime</CODE> - the starting time</DL>
</DD>
</DL>
<HR>

<A NAME="isFinished()"><!-- --></A><H3>
isFinished</H3>
<PRE>
public boolean <B>isFinished</B>()</PRE>
<DL>
<DD>Returns true if the motion has run its course and has finished meaning the current
 time is greater than startTime + duration.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>true if System.currentTimeMillis() > duration + startTime or the last returned value is the destination value</DL>
</DD>
</DL>
<HR>

<A NAME="getValue()"><!-- --></A><H3>
getValue</H3>
<PRE>
public int <B>getValue</B>()</PRE>
<DL>
<DD>Returns the value for the motion for the current clock time. 
 The value is dependent on the Motion type.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a value that is relative to the source value</DL>
</DD>
</DL>
<HR>

<A NAME="getSourceValue()"><!-- --></A><H3>
getSourceValue</H3>
<PRE>
public int <B>getSourceValue</B>()</PRE>
<DL>
<DD>The number from which we are starting (usually indicating animation start position)
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the source value</DL>
</DD>
</DL>
<HR>

<A NAME="getDestinationValue()"><!-- --></A><H3>
getDestinationValue</H3>
<PRE>
public int <B>getDestinationValue</B>()</PRE>
<DL>
<DD>The number to which we will reach when the motion is finished
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the source value</DL>
</DD>
</DL>
<HR>

<A NAME="setSourceValue(int)"><!-- --></A><H3>
setSourceValue</H3>
<PRE>
public void <B>setSourceValue</B>(int&nbsp;sourceValue)</PRE>
<DL>
<DD>The number from which we are starting (usually indicating animation start position)
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sourceValue</CODE> - the source value</DL>
</DD>
</DL>
<HR>

<A NAME="getStartTime()"><!-- --></A><H3>
getStartTime</H3>
<PRE>
protected long <B>getStartTime</B>()</PRE>
<DL>
<DD>The value of System.currentTimemillis() when motion was started
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the start time</DL>
</DD>
</DL>
<HR>

<A NAME="getDuration()"><!-- --></A><H3>
getDuration</H3>
<PRE>
public int <B>getDuration</B>()</PRE>
<DL>
<DD>Returns the animation duration
<P>
<DD><DL>

<DT><B>Returns:</B><DD>animation duration in milliseconds</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Motion.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/sun/lwuit/animations/CommonTransitions.html" title="class in com.sun.lwuit.animations"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/sun/lwuit/animations/Timeline.html" title="class in com.sun.lwuit.animations"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/sun/lwuit/animations/Motion.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Motion.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>
